import React from 'react';
import { Text, View, TouchableOpacity } from 'react-native';
import Icon from "react-native-vector-icons/Feather";
import styles from './styles';
import { addStars } from '../../../utils';

export default ({ data, onPress }) => {
  return (
    <TouchableOpacity onPress={onPress} style={styles.item}>
      <View style={styles.customerInfo}>
        <Text style={styles.itemName}>{data.name}</Text>
        <Text style={styles.itemMobile}>{addStars(data.mobile, 3, 6)}</Text>
      </View>
      <Icon name="chevron-right" size={24} color="#0066cc" />
    </TouchableOpacity>
  );
};
